﻿@{
    ViewData["Title"] = "参数配置";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
<style>
    .layui-form-label {
        width: 160px;
    }
</style>
@inject Sykj.IServices.IConfigsys _configsys
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">参数配置</div>
                <div class="layui-card-body">
                    <form class="layui-form" style="padding: 20px 30px 0 0;" method="post">
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend>微信商户ApiKey配置</legend>
                        </fieldset>
                        <div class="layui-form-item">
                            <label class="layui-form-label">WxJsApiKey</label>
                            <div class="layui-col-xs10">
                                <input id="WxJsApiKey" name="WxJsApiKey" value="@_configsys.GetValue("WxJsApiKey")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">WxNativeApiKey</label>
                            <div class="layui-col-xs10">
                                <input id="WxNativeApiKey" name="WxNativeApiKey" value="@_configsys.GetValue("WxNativeApiKey")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">WxApiKey</label>
                            <div class="layui-col-xs10">
                                <input id="WxApiKey" name="WxApiKey" value="@_configsys.GetValue("WxApiKey")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend>微信公众平台小程序</legend>
                        </fieldset>
                        <div class="layui-form-item">
                            <label class="layui-form-label">AppId</label>
                            <div class="layui-col-xs10">
                                <input id="WechatAppID" name="WechatAppID" value="@_configsys.GetValue("WechatAppID")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Secret</label>
                            <div class="layui-col-xs10">
                                <input id="WechatAppSecret" name="WechatAppSecret" value="@_configsys.GetValue("WechatAppSecret")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend>微信公众平台服务号</legend>
                        </fieldset>
                        <div class="layui-form-item">
                            <label class="layui-form-label">AppId</label>
                            <div class="layui-col-xs10">
                                <input id="WxAppID" name="WxAppID" value="@_configsys.GetValue("WxAppID")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Secret</label>
                            <div class="layui-col-xs10">
                                <input id="WxAppSecret" name="WxAppSecret" value="@_configsys.GetValue("WxAppSecret")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend>微信开放平台移动应用</legend>
                        </fieldset>
                        <div class="layui-form-item">
                            <label class="layui-form-label">AppId</label>
                            <div class="layui-col-xs10">
                                <input id="WechatFWAppID" name="WechatFWAppID" value="@_configsys.GetValue("WechatFWAppID")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Secret</label>
                            <div class="layui-col-xs10">
                                <input id="WechatFWAppSecret" name="WechatFWAppSecret" value="@_configsys.GetValue("WechatFWAppSecret")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend>微信开放平台网站应用</legend>
                        </fieldset>
                        <div class="layui-form-item">
                            <label class="layui-form-label">AppId</label>
                            <div class="layui-col-xs10">
                                <input id="WxPcAppID" name="WxPcAppID" value="@_configsys.GetValue("WxPcAppID")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Secret</label>
                            <div class="layui-col-xs10">
                                <input id="WxPcAppSecret" name="WxPcAppSecret" value="@_configsys.GetValue("WxPcAppSecret")" lay-verify="required" class="layui-input">
                            </div>
                            <div class="layui-tips-danger">
                                *必填
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-col-xs5">
                                <button class="layui-btn" lay-submit lay-filter="edit" id="submit" type="button">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@section scriptsfeet
        {
    <script type="text/javascript">
        layui.config({
            base: '/layuiadmin/' //静态资源所在路径;
        }).use(['form', 'sykjwh'], function () {

            var $ = layui.$
                , form = layui.form
                , sykjwh = layui.sykjwh;

            //表单提交
            form.on('submit(edit)', function (obj) {
                sykjwh.save('@Url.Action("ParamConfig", "config", new { area = Constant.AREAMANAGER })', obj.field);
            });
        });
    </script>
}
